<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<meta content="" name="description"/>
<meta content="" name="author"/>
<meta name="MobileOptimized" content="320">
<!-- BEGIN GLOBAL MANDATORY STYLES -->
<link href="assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
<!-- END GLOBAL MANDATORY STYLES -->
<!-- BEGIN PAGE LEVEL STYLES -->
<link rel="stylesheet" type="text/css" href="{$CSS}assets/plugins/select2/select2_metro.css"/>
<link rel="stylesheet" href="{$CSS}assets/plugins/data-tables/DT_bootstrap.css"/>
<!-- END PAGE LEVEL STYLES -->
<!-- BEGIN THEME STYLES -->
<link href="assets/css/style-metronic.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/style.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/style-responsive.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/plugins.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/themes/default.css" rel="stylesheet" type="text/css" id="style_color"/>
<link href="assets/css/custom.css" rel="stylesheet" type="text/css"/>

<title>我的活动</title>
</head>
<body class="page-header-fixed">
<div class="row">
<div class="col-sm-12">
	<div class="portlet box blue">
	<div class="portlet-title">
	<div class="caption">
								<i class="fa fa-edit"></i>Ajax Datatable
							</div>
							<div class="tools">
								<a href="javascript:;" class="collapse"></a>
								<a href="#portlet-config" data-toggle="modal" class="config"></a>
								<a href="javascript:;" class="reload"></a>
								<a href="javascript:;" class="remove"></a>
							</div>
	</div>
	<div class="portlet-body">
    <div class="table-toolbar">
		<div class="btn-group">
									<button id="sample_editable_1_new" class="btn green">
									新增 <i class="fa fa-plus"></i>
									</button>
									<button id="del" class="btn red">
									删除 <i class="fa fa-minus"></i>
									</button>
						     <form class="form-subscribe、" action="">
                        <div class="input-group input-large">
                           {$tj->text('name','class="form-control" placeholder="请输入名称" ')}
                            <span class="input-group-btn">
                                <button class="btn theme-btn" type="submit">查询</button>
                            </span>
                        </div>
                    </form>
	
	    
		  
								</div>
		<!--<a href="indexadd.html" class="btn btn-small btn-primary">新增</a>-->
		<!--<button class="btn btn-small"  id="del">删除</button>-->
		</div>
		
	<table class="table table-striped table-bordered table-hover" id="sample_2">
			<thead>
				<tr>
					<th>活动名称</th>
					<th>关键字</th>
					<th>活动时间</th>
					
				</tr>
			</thead>
			<tbody>
			</tbody>
		</table>
		</div>
		</div>
		</div>
			</div>

<!-- END FOOTER -->
<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
<!-- BEGIN CORE PLUGINS -->
<!--[if lt IE 9]>
<script src="assets/plugins/respond.min.js"></script>
<script src="assets/plugins/excanvas.min.js"></script> 
<![endif]-->
<script src="assets/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
<script src="assets/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="assets/plugins/bootstrap-hover-dropdown/twitter-bootstrap-hover-dropdown.min.js" type="text/javascript"></script>
<script src="assets/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
<script src="assets/plugins/jquery.blockui.min.js" type="text/javascript"></script>
<script src="assets/plugins/jquery.cokie.min.js" type="text/javascript"></script>
<script src="assets/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script>
<!-- END CORE PLUGINS -->
<!-- BEGIN PAGE LEVEL PLUGINS -->
<script type="text/javascript" src="assets/plugins/select2/select2.min.js"></script>
<script type="text/javascript" src="assets/plugins/data-tables/jquery.dataTables.js"></script>
<script type="text/javascript" src="assets/plugins/data-tables/DT_bootstrap.js"></script>
<!-- END PAGE LEVEL PLUGINS -->
<!-- BEGIN PAGE LEVEL SCRIPTS -->
<script src="assets/scripts/app.js"></script>
<script src="assets/scripts/datatable.js"></script>
<!--<script src="assets/scripts/table-ajax.js"></script>-->

<script>
jQuery(document).ready(function() {       
   App.init();
   //TableAdvanced.init();
   //TableAjax.init();
   $('#sample_2').dataTable({
        "bProcessing": true,
        "bServerSide": true,
		"iDisplayLength": 5,
        "sAjaxSource": "http://rapid.local/table_ajax.html"
    });
           
});
</script><script  type="text/javascript">
function dellbs(controlName,id,o){
	if(id=='a'){
		var ids = [];
		$('td').find('input[type="checkbox"]:checked').each(function(){
			ids[ids.length] = $(this).val();
		});
		if(ids.length == 0){
			alert('请选择要删除的选项');
	        return false;
		}else{
		if(confirm('确定删除这些信息吗？')){
			ajax(controlName+'-del.html',{ id:ids.join(',')},function(){
				$('td').find('input[type="checkbox"]:checked').each(function(){
					$(this).parent().parent().remove();
				});
			});	
		}
	}
	}else{
		if(confirm('确定删除此条信息吗？')){
			ajax(controlName+'-del.html',{ id:id},function(){
				$(o).parent().parent().parent().remove();
			});	
		}
	}	
}

   
</script>
</body>
</html>